/// File:		WindowClass.h
/// Author:		Dennis Norton
/// Date:		03/28/12
/// Purpose:	This class modulerizes the windows application into a class.
///				All things involving the windows application go into here and no where else.

#ifndef WINDOWCLASS_H_
#define WINDOWCLASS_H_

#include "../Norton Game/Program Includes.h"

class MessageSystemComponent;
class SettingsComponent;
class WindowClass
{
	RECT _Window;
	bool _IsFullScreen;
	HDC _DeviceContextHandle;
	HWND _WindowHandle;
	HINSTANCE _hInstance;
	SettingsComponent* _Settings;

	static MessageSystemComponent* _MessageSystem; // Pointer to the messaging system

	WindowClass(const WindowClass&);
	WindowClass& operator=(const WindowClass&);

	static LRESULT CALLBACK _WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
public:
	WindowClass();
	WindowClass(int WindowWidth, int WindowHeight, bool FullScreen);
	~WindowClass();

	void Initialize(HINSTANCE instance, MessageSystemComponent* MSC, SettingsComponent* SC);

	void Update();

	void Shutdown();

	bool Resize(int WindowWidth, int WindowHeight, bool Fullscreen);
	bool ToggleFullScreen();
	bool IsAlreadyRunning(HINSTANCE hPrevInstance);

	HWND GetHWND() const { return _WindowHandle;}
};

#endif